Question 1: Use the tidyquant library
and it’s tq_get function to grab the historical stock
prices for the FAANG stocks: Facebook, Apple, Amazon, Netflix, and
Google. Then recreate the animated plot below. Things to take note
of:
Question 2: Remember this map from the last problem set? Turn it into an interactive map using the Leaflet package. Remember that the counties that comprise Northern Virginia are grouped together into one distinct region, while the rest of the state is represented by individual counties. The variable shown for those Northern Virginia counties is the median of the median household incomes for that group of counties. I used the definition of Northern Virginia from here. A few things to take note of:
For the final question of the problem set, you will be required to make your own visualizations without any reference viz to guide you.
Question 3: Create an animated plot using the FAANG
stock data in which you reveal the adjusted prices of the stocks by date
as a line chart. Make sure the animation is not too fast AND not too
slow. To do so, you’ll likely have to manipulate the number of frames
generated and/or the FPS (hint: look at the animation()
documentation).
Your plot should have a legend (if necessary), descriptive title and subtitle, and all plot elements should be human readable (no overlapping text, no acronyms unless they are defined, no underscores). Scales should make sense and be rounded to 2 digits or less (if applicable).
BONUS: (not required) - Pause the animation at the end of the time series for a reasonable amount of time before it loops again.